package com.nsgf.library.ui.page.fragment;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.kunminx.architecture.ui.page.DataBindingConfig;
import com.kunminx.architecture.ui.state.State;
import com.nsgf.library.BR;
import com.nsgf.library.R;
import com.nsgf.library.data.api.APIs;
import com.nsgf.library.data.bean.ProjectBean;
import com.nsgf.library.data.bean.UserInfo;
import com.nsgf.library.data.bean.WorkOrderDetailBean;
import com.nsgf.library.data.bean.XBannerBeanInfo;
import com.nsgf.library.databinding.FragmentNsgfCharacteristicBinding;
import com.nsgf.library.databinding.FragmentNsgfRegisterBinding;
import com.nsgf.library.domain.request.AccountRequester;
import com.nsgf.library.glide.GlideImgManager;
import com.nsgf.library.photopicker.PhotoPreview;
import com.nsgf.library.photopicker.widget.MultiPickResultView;
import com.nsgf.library.ui.page.BaseFragment;
import com.nsgf.library.ui.page.StateHolder;
import com.nsgf.library.utils.StringUtil;
import com.stx.xhb.xbanner.XBanner;

import java.util.ArrayList;
import java.util.List;


/**
 * 工程概况-注册登记
 */
public class ProjectCharacteristicFragment extends BaseFragment {


    public static ProjectCharacteristicFragment newInstance(ProjectBean projectBean) {
        ProjectCharacteristicFragment fragment = new ProjectCharacteristicFragment();
        Bundle bundle = new Bundle();
        bundle.putParcelable("projectBean", projectBean);
        fragment.setArguments(bundle);
        return fragment;
    }

    private ProjectBean getData() {
        return getArguments().getParcelable("projectBean");
    }

    private ProjectCharacteristicStates mStates;

    @Override
    protected void initViewModel() {
        mStates = getActivityScopeViewModel(ProjectCharacteristicStates.class);
        mAccountRequester = getActivityScopeViewModel(AccountRequester.class);
    }

    private AccountRequester mAccountRequester;

    @Override
    protected DataBindingConfig getDataBindingConfig() {

        return new DataBindingConfig(R.layout.fragment_nsgf_characteristic, BR.vm, mStates);
    }

    @Override
    public void onViewCreated(@NonNull View v, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(v, savedInstanceState);
        getLifecycle().addObserver(mAccountRequester);
        mBinding = (FragmentNsgfCharacteristicBinding) getBinding();
        mStates.projectBeanState.set(getData());


    }

    private String search = "";


    private FragmentNsgfCharacteristicBinding mBinding;


    public static class ProjectCharacteristicStates extends StateHolder {

    }
}
